<html>
<head><meta charset="utf-8"><title>lang team sync · project-ffi-unwind · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/index.html">project-ffi-unwind</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html">lang team sync</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="178410154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178410154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178410154">(Oct 17 2019 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I just submitted a PR with my write-up. (Do you mind this sort of dual-notification when you're already getting a GitHub notification for this?) <a href="https://github.com/nikomatsakis/project-ffi-unwind/pull/12/files" target="_blank" title="https://github.com/nikomatsakis/project-ffi-unwind/pull/12/files">https://github.com/nikomatsakis/project-ffi-unwind/pull/12/files</a></p>



<a name="178410177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178410177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178410177">(Oct 17 2019 at 18:50)</a>:</h4>
<p>Please let me know if there's anything I'm not capturing that you think I should</p>



<a name="178411321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178411321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178411321">(Oct 17 2019 at 19:01)</a>:</h4>
<p>To be clear, I am not expecting that this be merged prior to the meeting</p>



<a name="178426014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178426014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178426014">(Oct 17 2019 at 22:03)</a>:</h4>
<p>I prefer zulip notification to GH</p>



<a name="178426058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178426058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178426058">(Oct 17 2019 at 22:04)</a>:</h4>
<p>though I do try to keep up with both</p>



<a name="178426648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178426648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178426648">(Oct 17 2019 at 22:12)</a>:</h4>
<p>Well then I shall continue to share!</p>



<a name="178426696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178426696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178426696">(Oct 17 2019 at 22:13)</a>:</h4>
<p>FYI my other PR is now +7 instead of +95 lines</p>



<a name="178983970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178983970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178983970">(Oct 24 2019 at 18:44)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="120076">@Kyle Strand</span> -- did you plan to attend lang team meeting and/or have any concise summary? If not, I can prep one</p>



<a name="178984505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178984505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178984505">(Oct 24 2019 at 18:50)</a>:</h4>
<p>I don't have a summary, but if you think it would be helpful I can join the meeting for a bit</p>



<a name="178984513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178984513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178984513">(Oct 24 2019 at 18:50)</a>:</h4>
<p>(deleted)</p>



<a name="178985607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178985607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178985607">(Oct 24 2019 at 19:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> Sorry to leave you in the lurch. Do you think it would be better to join or skip this week?</p>



<a name="178995271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178995271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178995271">(Oct 24 2019 at 20:40)</a>:</h4>
<p>No worries -- but the team was fairly skeptical of this change to extern "C" permitting unwind by default</p>



<a name="178995318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178995318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178995318">(Oct 24 2019 at 20:40)</a>:</h4>
<p>I took some notes and will try to update <a href="https://hackmd.io/ymsEL6OpR6OSMoFr1As1rw" target="_blank" title="https://hackmd.io/ymsEL6OpR6OSMoFr1As1rw">the document</a></p>



<a name="178997674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178997674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178997674">(Oct 24 2019 at 21:08)</a>:</h4>
<p>OK, so, I have updated the document. To me, the argument for extern "C" making unwinding UB is pretty strong -- it comes down to better alignment between the default and reality (i.e., most FFI calls do <em>not</em> unwind, and so it's better to call out those that do, which means we can have more special treatment at less cost).</p>



<a name="178997757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178997757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178997757">(Oct 24 2019 at 21:08)</a>:</h4>
<p>It seems to me that technical details (i.e., about what is or is not UB within LLVM) are largely orthogonal from the question of what our default should be -- we have to work them out either way, if we want "C unwind".</p>



<a name="178997765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178997765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178997765">(Oct 24 2019 at 21:08)</a>:</h4>
<p>However, if we <em>can't</em> work them all out, then that is further argument for "C unwind"</p>



<a name="178997788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178997788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178997788">(Oct 24 2019 at 21:08)</a>:</h4>
<p>So TL;DR at this point I feel pretty sure that "C" / "C unwind" is a better choice than "C" / "C noexcept"</p>



<a name="178997817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178997817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178997817">(Oct 24 2019 at 21:09)</a>:</h4>
<p>I'd be curious <span class="user-mention" data-user-id="143274">@Amanieu</span> / <span class="user-mention" data-user-id="132920">@gnzlbg</span> if you see any problems with the arguments in <a href="https://hackmd.io/ymsEL6OpR6OSMoFr1As1rw?edit" target="_blank" title="https://hackmd.io/ymsEL6OpR6OSMoFr1As1rw?edit">the hackmd document</a>.</p>



<a name="178998237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178998237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178998237">(Oct 24 2019 at 21:13)</a>:</h4>
<p>I’ll read that later, but “most FFI calls to C do not unwind” matches my experience as well</p>



<a name="178999545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178999545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178999545">(Oct 24 2019 at 21:26)</a>:</h4>
<p>The reason I think the LLVM and other platform details are relevant is that I do think there's some value in matching existing behavior in the "native ecosystem"; and, in general, if unwinding can be expected to work safely in the ecosystem at large, then it seems reasonable to expect Rust to support that by default.</p>
<p>That said, I agree that this isn't the most important consideration, and that there are very good reasons why Rust already diverges substantially from C++ (the de facto "native ecosystem" trend setter)</p>



<a name="178999635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178999635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178999635">(Oct 24 2019 at 21:27)</a>:</h4>
<p>For instance, conceptually, I like that mangling is explicitly controlled with <code>no_mangle</code> as opposed to implicit with <code>extern "C"</code></p>



<a name="178999860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178999860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178999860">(Oct 24 2019 at 21:30)</a>:</h4>
<p>But, as a data point for my "existing behavior in the ecosystem" comment, when I told nlewycky about the unwinding discussion, he was pretty surprised by the idea that Rust would try to "sandbox" unwinds</p>



<a name="178999928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/178999928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#178999928">(Oct 24 2019 at 21:31)</a>:</h4>
<p>His position was that unwinding is part of the ABI, and the "C" ABI should be expected to potentially unwind (context: he was an LLVM dev for several years)</p>



<a name="179001663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001663">(Oct 24 2019 at 21:56)</a>:</h4>
<p>I think that's fair, but also abstract</p>



<a name="179001720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001720">(Oct 24 2019 at 21:57)</a>:</h4>
<p>In practice, a large number of C++ projects do not use exceptions (and compile with <code>-fno-exceptions</code> or whatever) -- in fact, I think maybe every C++ project I ever worked on? And of course things written in C largely do not unwind either. (Modulo longjmp I guess)</p>



<a name="179001730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001730">(Oct 24 2019 at 21:57)</a>:</h4>
<p>That's very on-brand for me <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="179001744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001744">(Oct 24 2019 at 21:57)</a>:</h4>
<p>( I actually don't know whether FF uses <code>-fno-exceptions</code>... I never really hacked on it that much:) )</p>



<a name="179001772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001772">(Oct 24 2019 at 21:57)</a>:</h4>
<p>In any case, the arguments in the doc are fairly specific</p>



<a name="179001830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001830">(Oct 24 2019 at 21:58)</a>:</h4>
<p>That said, I think one of them -- "code-size savings" -- is only mildly persuasive. I'd like to see realistic measurements of real projects.</p>



<a name="179001917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179001917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179001917">(Oct 24 2019 at 21:59)</a>:</h4>
<p>On a more practical note, I feel like a "180" of this kind is itself going a bit "beyond our mandate" in this group -- I think if we really feel it's best, we should make the case, but it'll require broader exposure, since most of the community has been expecting the opposite default.</p>



<a name="179002351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179002351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179002351">(Oct 24 2019 at 22:04)</a>:</h4>
<p>I'll think about it more (and hopefully have some time this weekend to write up summaries of all the discussion that's happened), but I think we can proceed with all of the following more or less in parallel:</p>
<ul>
<li>trim Niko's RFC down to just an announcement of the project WG and post it</li>
<li>continue to design <code>extern "C unwind"</code> and (hopefully within the next week) post a minimial RFC</li>
<li>stabilize the abort-on-unwind-through-<code>extern "C"</code> logic [1]</li>
<li>possibly, design some explicit opt-in syntax for the abort-on-unwind feature</li>
</ul>
<p>[1] Centril brought this up in another thread as an argument against merging the remove-<code>nounwind</code> PR. Personally, despite the disagreements about abort-on-unwind-without-recourse in the past, I am currently of the opinion that it's okay to merge, because:</p>
<ul>
<li>AFAIK, unlike before, we have no one successfully using the existing behavior who is asking for it to remain in place:<ul>
<li><code>setjmp</code>/<code>longjmp</code> no longer aborts with this logic, which makes rlua's use-case irrelevant</li>
<li>My understanding is that mozjpeg-sys doesn't really "work" currently anyway, at least in a stable/reliable way</li>
<li>Lucet is using <code>unwind(allowed)</code> on nightly</li>
</ul>
</li>
<li>We can announce this project group to ensure that everyone is aware we're committed to providing a stable solution</li>
</ul>
<p>The main reason <em>not</em> to do this, I think, would be to keep open the possibility of changing the default. I would like to say that we could change it back to permit unwinding in the future as long as we say "the behavior is still not considered stable, but as of right now, in practice it aborts." But I'm not sure this is reasonable: people could rely on not-unwinding for safety, and then there is a risk of crates not adopting any explicit abort-on-unwind feature once we introduce it. I'm a bit torn on this question.</p>



<a name="179015558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015558">(Oct 25 2019 at 01:49)</a>:</h4>
<p>I'm a bit confused, is the plan to make "extern C" UB on unwind or abort on unwind?</p>



<a name="179015565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015565">(Oct 25 2019 at 01:49)</a>:</h4>
<p>In any case, I'm not too attached to allowing unwinding in "extern C" by default.</p>



<a name="179015624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015624">(Oct 25 2019 at 01:50)</a>:</h4>
<p>Safe <code>extern "C" fn</code>s must abort on unwind; otherwise you have unsoundness</p>



<a name="179015766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015766">(Oct 25 2019 at 01:54)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> You are talking about <code>extern "C"</code> definitions, not declarations, right?</p>



<a name="179015772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015772">(Oct 25 2019 at 01:54)</a>:</h4>
<p>yep</p>



<a name="179015788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015788">(Oct 25 2019 at 01:54)</a>:</h4>
<p>Right that clarifies things, thanks.</p>



<a name="179015790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179015790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179015790">(Oct 25 2019 at 01:54)</a>:</h4>
<p>not the thing in <code>extern ABIString { ... }</code> blocks (imports)</p>



<a name="179016356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179016356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179016356">(Oct 25 2019 at 02:09)</a>:</h4>
<p>Sounds like everyone's in agreement that <code>extern "C unwind"</code> is an acceptable path forward, and that we are still leaning toward stabilizing the abort-logic for functions defined with <code>extern "C"</code>. I hope to get some time this weekend to write up summaries of these discussions and maybe even get an RFC or two ready to post.</p>



<a name="179032860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179032860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179032860">(Oct 25 2019 at 08:57)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> i read the document, but i was confused in some passages because when the text says "C function" it is not clear to me whether that means <code>extern "C"</code> with or without unwinding allowed, `extern "C unwind", or in some cases, whether it means functions defined in Rust or function declarations.</p>



<a name="179032866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179032866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179032866">(Oct 25 2019 at 08:58)</a>:</h4>
<p>I'll leave some notes</p>



<a name="179552965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179552965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179552965">(Oct 31 2019 at 17:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I am pretty disheveled today so I'll join by audio :D</p>



<a name="179552998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179552998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179552998">(Oct 31 2019 at 17:09)</a>:</h4>
<p>haven't written anything up yet, but my "summarizing discussions" file and the new PR itself might be sufficient anyway</p>



<a name="179554176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179554176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179554176">(Oct 31 2019 at 17:20)</a>:</h4>
<p>Oh, also, project group sync today? Now that we are "announced" it might be good to put a link to the meeting somewhere easily-findable</p>



<a name="179568064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179568064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179568064">(Oct 31 2019 at 19:36)</a>:</h4>
<p>The sync went good</p>



<a name="179568081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179568081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179568081">(Oct 31 2019 at 19:36)</a>:</h4>
<p>For some reason muting my zoom didn't really mute it :/</p>



<a name="179568093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/lang%20team%20sync/near/179568093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/lang.20team.20sync.html#179568093">(Oct 31 2019 at 19:36)</a>:</h4>
<p>So thanks to whoever supermuted me</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>